<?php
/**
 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
 * @link          https://cakephp.org CakePHP(tm) Project
 * @package       app.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       https://opensource.org/licenses/mit-license.php MIT License
 */

$cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework');
$cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
?>
<!DOCTYPE html>
<html>
<head>
	<style type="text/css">
		body{overflow: hidden;}
		iframe{marginheight:0; marginwidth:0; frameborder:0;border: none;}
	</style>
	<!--<link rel="stylesheet" href="/css/layui/css/layui.css">-->
	<!--<script src="/css/layui/layui.js"></script>-->
	<!--<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>-->
	<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
	<link href="/css/hadmin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
	<link href="/css/hadmin/css/animate.css" rel="stylesheet">
	<link href="/css/hadmin/css/style.css?v=4.1.0" rel="stylesheet">
</head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div id="wrapper">
	<!--左侧导航开始-->
	<nav class="navbar-default navbar-static-side" role="navigation">
		<div class="nav-close"><i class="fa fa-times-circle"></i>
		</div>
		<div class="sidebar-collapse">
			<ul class="nav" id="side-menu">
				<li class="nav-header">
					<div class="dropdown profile-element">
						<a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                                    <span class="block m-t-xs" style="font-size:20px;">
                                        <i class="fa fa-area-chart"></i>
                                        <strong class="font-bold">Admin</strong>
                                    </span>
                                </span>
						</a>
					</div>
				</li>
				<li>
					<a class="J_menuItem" href=".html">
						<i class="fa fa-home"></i>
						<span class="nav-label">主页</span>
					</a>
				</li>
				<?php foreach($menu as $v): ?>
				<li>
					<a href="#">
						<i class="<?= $v['font_class'] ?>"></i>
						<span class="nav-label"><?= $v['auth_name'] ?></span>
						<span class="fa arrow"></span>
					</a>
					<ul class="nav nav-second-level">
						<?php foreach($v['son'] as $vv):?>
						<li>
							<a class="J_menuItem" href="<?= $vv['path'] ?>"><?= $vv['auth_name'] ?></a>
						</li>
						<?php endforeach; ?>
					</ul>
				</li>
				<?php endforeach; ?>
			</ul>
		</div>
	</nav>
	<!--左侧导航结束-->
	<!--右侧部分开始-->
	<div id="page-wrapper" class="gray-bg dashbard-1">
	<div class="row border-bottom">
		<nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
			<div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-info " href="#"><i class="fa fa-bars"></i> </a>
				<form role="search" class="navbar-form-custom" method="post" action="search_results.html">
					<div class="form-group">
						<input type="text" placeholder="请输入您需要查找的内容 …" class="form-control" name="top-search" id="top-search">
					</div>
				</form>
			</div>
			<!--<ul class="nav navbar-top-links navbar-right">-->
				<!--<li class="dropdown">-->
					<!--<a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">-->
						<!--<i class="fa fa-envelope"></i> <span class="label label-warning">16</span>-->
					<!--</a>-->
					<!--<ul class="dropdown-menu dropdown-messages">-->
						<!--<li class="m-t-xs">-->
							<!--<div class="dropdown-messages-box">-->
								<!--<a href="profile.html" class="pull-left">-->
									<!--<img alt="image" class="img-circle" src="img/a7.jpg">-->
								<!--</a>-->
								<!--<div class="media-body">-->
									<!--<small class="pull-right">46小时前</small>-->
									<!--<strong>小四</strong> 是不是只有我死了,你们才不骂爵迹-->
									<!--<br>-->
									<!--<small class="text-muted">3天前 2014.11.8</small>-->
								<!--</div>-->
							<!--</div>-->
						<!--</li>-->
						<!--<li class="divider"></li>-->
						<!--<li>-->
							<!--<div class="dropdown-messages-box">-->
								<!--<a href="profile.html" class="pull-left">-->
									<!--<img alt="image" class="img-circle" src="img/a4.jpg">-->
								<!--</a>-->
								<!--<div class="media-body ">-->
									<!--<small class="pull-right text-navy">25小时前</small>-->
									<!--<strong>二愣子</strong> 呵呵-->
									<!--<br>-->
									<!--<small class="text-muted">昨天</small>-->
								<!--</div>-->
							<!--</div>-->
						<!--</li>-->
						<!--<li class="divider"></li>-->
						<!--<li>-->
							<!--<div class="text-center link-block">-->
								<!--<a class="J_menuItem" href="mailbox.html">-->
									<!--<i class="fa fa-envelope"></i> <strong> 查看所有消息</strong>-->
								<!--</a>-->
							<!--</div>-->
						<!--</li>-->
					<!--</ul>-->
				<!--</li>-->
				<!--<li class="dropdown">-->
					<!--<a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">-->
						<!--<i class="fa fa-bell"></i> <span class="label label-primary">8</span>-->
					<!--</a>-->
					<!--<ul class="dropdown-menu dropdown-alerts">-->
						<!--<li>-->
							<!--<a href="mailbox.html">-->
								<!--<div>-->
									<!--<i class="fa fa-envelope fa-fw"></i> 您有16条未读消息-->
									<!--<span class="pull-right text-muted small">4分钟前</span>-->
								<!--</div>-->
							<!--</a>-->
						<!--</li>-->
						<!--<li class="divider"></li>-->
						<!--<li>-->
							<!--<a href="profile.html">-->
								<!--<div>-->
									<!--<i class="fa fa-qq fa-fw"></i> 3条新回复-->
									<!--<span class="pull-right text-muted small">12分钟钱</span>-->
								<!--</div>-->
							<!--</a>-->
						<!--</li>-->
						<!--<li class="divider"></li>-->
						<!--<li>-->
							<!--<div class="text-center link-block">-->
								<!--<a class="J_menuItem" href="notifications.html">-->
									<!--<strong>查看所有 </strong>-->
									<!--<i class="fa fa-angle-right"></i>-->
								<!--</a>-->
							<!--</div>-->
						<!--</li>-->
					<!--</ul>-->
				<!--</li>-->
			<!--</ul>-->
		</nav>
	</div>
	<div class="row J_mainContent" id="content-main">
		<iframe id="J_iframe" width="100%" height="100%" src="/admin/index" frameborder="0" data-id="/admin/index" seamless></iframe>
	</div>
</div>
	<!--右侧部分结束-->
</div>

<!-- 全局js -->
<script src="/css/hadmin/js/jquery.min.js?v=2.1.4"></script>
<script src="/css/hadmin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/css/hadmin/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/css/hadmin/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/css/hadmin/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/css/hadmin/js//hAdmin.js?v=4.1.0"></script>
<script type="text/javascript" src="/css/hadmin/js/index.js"></script>
</body>
</html>


<script>
	layui.use(['element', 'layer', 'util'], function(){
	});

	$('#logout').click(function () {
		$.ajax({
			'url':'/login/logout',
			'type':'post',
			'dataType':'json',
			'success':function (res) {
				console.log(res);
				if (res == true){
						layui.use('layer',function () {
							var layer = layui.layer;
							layer.msg('登出成功');
						})
					setTimeout(function () {
						window.location.href='/login/login';
					},600)
				}

			}
		});
	})



</script>
